<!DOCTYPE html>
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<title>设置</title>
	<link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />

    <style>
			html, body {width: 100%;min-height: 100%;background: #f0f0f0;}
			.h20 {height:0.5rem;background: #f0f0f0;}

      .integral .aui-list-item-title ,.integral .aui-list-item-right {
        color: #999;
        font-size: 0.8rem;
      }
      .integral .color333 {
        color: #333;
      }
      .submit {
        position: fixed;
        bottom: 0;
        left: 0;
        padding: 0 0.75rem;
        text-align: center;
        width: 100%;
      }
      .submit a {
        height: 2.5rem;
        line-height: 2.5rem;
        color: #fff;
        background-color: #2997e4;
        border-radius: 4px;
        width: 100%;
        font-size: 1rem;
        margin: 4rem 0 1.5rem;
      }
    </style>
</head>
<body>
<div id="app" v-cloak>
  <div class="h20"></div>

  <div class="aui-content integral">
    <ul class="aui-list aui-list-in">
        <li>
            <div class="aui-list-item-inner aui-list-item">
                <div class="aui-list-item-title">绑定微信</div>
                <div class="aui-list-item-right">未绑定</div>
            </div>
        </li>
        <li>
            <div class="aui-list-item-inner aui-list-item">
                <div class="aui-list-item-title">绑定QQ</div>
                <div class="aui-list-item-right">未绑定</div>
            </div>
        </li>
        <li tapmode="presshover" v-if="token != ''" onclick="openNewWindow('changepassword','修改密码')">
            <div class="aui-list-item-inner aui-list-item aui-list-item-arrow">
                <div class="aui-list-item-title">修改密码</div>
            </div>
        </li>
        <li>
            <div class="aui-list-item-inner aui-list-item">
                <div class="aui-list-item-title">清除缓存</div>
                <div class="aui-list-item-right color333">20M</div>
            </div>
        </li>
    </ul>
</div>

<div class="submit" v-if="token != ''">
  <a href="javascript:;" @click="backLogin()">退出登录</a>
</div>


</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
apiready = function() {
	var URL = 'http://kexiecs.unohacha.com/kexieScore';

	var app = new Vue({
		el: '#app',
		data: {
			token: '',
		},
		created: function() {
			var $_this = this;
			$_this.token = $api.getStorage('token') || ''
		},
		methods: {
			backLogin: function () {
				var $_this = this;
				$api.rmStorage('token')
				$api.rmStorage('data')
					 api.closeWin({
						 name: 'index'
					 });
				api.execScript({
							name: 'root',
						frameName: 'index',
						script: 'location.reload();'
				});
				api.openWin({
					reload: true,
					name: 'index',
					pageParam: {
						name: 'index',
						userInfo: $_this.userInfo,
						token: $_this.token,
					},
					url: '../../index.html',
					delay: 200,
					bounces: false
				});
			}
		}
	})
}
  function openNewWindow(type,title)
  {
    api.openWin({
			reload:true,
      name: type,
      url: './forth_header.html',
      pageParam: {name: type,title: title},
      bounces: false,
      delay:200
    });
  }

	function openLogin()
	{
		api.openWin({
			reload:true,
			name: 'login',
			url: './login_header.html',
			bounces: false,
			delay:200
		});
	}
</script>
</html>
